package com.software.loginregister.api;

import com.software.loginregister.entity.SearchHistory;
import com.software.loginregister.entity.Result;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface SearchHistoryService {
    @POST("/search/history/add")
    Call<Result<Void>> addSearchHistory(@Body SearchHistory searchHistory);

    @GET("/search/history/list")
    Call<Result<List<SearchHistory>>> getSearchHistory(@Query("userId") Long userId);

    @POST("/search/history/clear")
    Call<Result<Void>> clearSearchHistory(@Query("userId") Long userId);
}
